{% extends 'base.html.twig' %}
{% block title %}{{ title }}{% endblock %}

{% block body %}
    <h2> {{ title }} </h2>
    <table class="table" width="100%">
        <tr>
            <th>名称</th>
            <th>状态</th>
            <th>操作</th>
        </tr>

        {% for row in data %}
            <tr style="background: #2a4137">
                <td width="60%"><a href="{{ url(row[2]) }}">{{ row[1] }}</a></td>
                <td>{{ row[3] ? '暂停' : '运行' }}</td>
                <td><a href="{{ url(row[2]) }}?pause={{ row[3] ? '0' : '1' }}">
                        {{ row[3] ? '运行' : '暂停' }}</a></td>
            </tr>
        {% endfor %}
    </table>
    <iframe name="pause_iframe" frameborder="0" height="0" width="0"></iframe>
{% endblock %}

{% block stylesheets %}
    <style type="text/css">
        body, table {
            background: #C0C0C0;
            font-size: 12px;

        }

        table {
            table-layout: auto;
            empty-cells: show;
            border-collapse: collapse;
            margin: 0 auto;
        }

        td {
            height: 30px;
        }

        h1, h2, h3 {
            font-size: 12px;
            margin: 0;
            padding: 0;
        }

        .table {
            border: 1px solid #cad9ea;
            color: #FFFFFF;

        }

        .table th {
            background: #2b2b2b;
            background-repeat: repeat-x;
            height: 60px;
        }

        .table td, .table th {
            border: 1px solid #cad9ea;
            padding: 0 1em 0;
            height: 50px;
        }

        .table tr.alter {
            background-color: #f5fafe;
        }

        a {
            height: 21px;
            line-height: 21px;
            padding: 0 11px;
            background: #02bafa;
            border: 1px #26bbdb solid;
            border-radius: 3px;
            /*color: #fff;*/
            display: inline-block;
            text-decoration: none;
            font-size: 12px;
            outline: none;
        }

        a {
            background: #e4e4e4;
        }
    </style>
{% endblock %}
{% block metaes %}
    <meta http-equiv="refresh" content="30">
{% endblock %}
